import getRuntimeConfig from "../../runtimeConfig/getRuntimeConfig";
export default {
  template: `
  <a-form-item
    ref
    class="webVueAntDatePickerFormItem _$customFormItemClassName$_ _$showLabel$_"
    name="_$value$_"
    :colon="false"
    :rules="_$rules$_">
      <template #label>
        <div class="label-content">
          <span class="ant-form-item-content" v-html="_$labelName$_"></span>
        </div>
      </template>
      <yt-custom-date-piker
        data-event
        class="_$customClassName$_"
        popupKey="_$popupKey$_ _$popupKeyId$_"
        v-model:value="_$value$_"
        :placeholder="_$placeholder$_"
        :mode="_$mode$_"
        :startDate="_$startDate$_"
        :endDate="_$endDate$_"
        :disabledDates="_$disabledDates$_"
        :showToday="_$showToday$_"
        :allowClear="_$allowClear$_"
        :disabled="_$disabled$_"
      />
    </a-form-item>
  `,
  clazzType: 'YtDatePicker',
  editConfig: {
    getRuntimeConfig,
    classKeys: ['class', ':class', 'v-bind:class', 'popupKey'],
    compatibilityKeys: [   // 兼容之前组件模版没有_$popupKeyId$_
      {
        key: 'popupKey',
        value: '_$popupKey$_ _$popupKeyId$_',
        deleteKey: ':popupKey'
      }
    ]
  }
}